package Exercise;

import java.util.Random;

public class Test2LotteryDraw2 {
    public static void disrupt(int[] reward) {
        Random r = new Random();
        int index, temp;
        for (int i = 0; i < reward.length - 1; i++) {
            index = r.nextInt(4) + 1;
            temp = reward[i];
            reward[i] = reward[index];
            reward[index] = temp;
        }
    }

    public static void main(String[] args) {
        int[] reward = {2, 288, 888, 1000, 10000};
        disrupt(reward);
        for (int i : reward) {
            System.out.print(i + " ");
        }
    }
}
